package com.bitc.crash.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.bitc.crash.model.entity.User;
import com.bitc.crash.model.request.UserLoginRequest;
import com.bitc.crash.model.vo.UserVO;

import jakarta.servlet.http.HttpServletRequest;

/**
 * 用户服务接口
 */
public interface UserService extends IService<User> {

    /**
     * 用户登录
     */
    UserVO userLogin(UserLoginRequest userLoginRequest, HttpServletRequest request);

    /**
     * 获取当前登录用户
     */
    User getLoginUser(HttpServletRequest request);

    /**
     * 获取当前登录用户VO
     */
    UserVO getLoginUserVO(HttpServletRequest request);

    /**
     * 用户登出
     */
    boolean userLogout(HttpServletRequest request);

    /**
     * 获取脱敏用户信息
     */
    UserVO getUserVO(User user);
}